39 - Recap Clip 10.3: Forward Checking [ID:22348]
49 von 49 angezeigt

So we're now left with the question what does this function inference in this algorithm

actually do?

And of course there's several ways of doing that.

You've already talked about forward checking, which is the straightforward one.

Basically you just check, given your partial assignment at this point, whenever you do

that you just look at all the other variables that are in some way constraints to your current

variable v once you've assigned that and just throw out all of the values in your domain

that already conflict with one of those constraints.

So what does that mean?

Here is again our map of Australia and with our territories.

So let's start with say assigning red to, I have no idea what WA stands for?

Western Australia.

Oh okay, I should have known.

So we start by assigning red to Western Australia and then of course what forward checking just

means is since our rule is that no two neighboring territories are allowed to have the same color,

that just means we take the two neighboring territories we have here and just rule out

the color red, which just means in Northern territories I'm guessing.

We rule out red and in Southern Australia I'm guessing we also rule out red.

Simple straightforward words.

Then of course we do the same thing.

We go over to Q?

Queensland.

Queensland, okay we go over to QE, Queensland, label that one green.

That allows us to throw out the color green in I'm guessing Northern territories, Southern

Australia and New South Wales.

Okay, New South Wales, get rid of green all of there.

And of course you should already see that there is a problem here now.

Why?

Yeah, can you throw the cube over there?

Because you've only blue remaining for both Northern territory and South Australia and

they are neighbors.

Yes exactly.

So basically forward checking, it is an improvement but we already noticed that in this case it's

not the smartest thing to do since basically we've now run into a branch that forces us

to backtrack because assigning the color green here apparently wasn't a good idea.

But you know, it's better than nothing.

If I now go over to assigning blue here to Virginia, Victoria, I knew it was something

with a British queen or something.

So apparently they now assigned blue to Victoria and that just rules out all the colors for

Southern Australia so apparently that was a dumb move.

But you know we shouldn't have even gotten that far, right?

A proper inference algorithm should have already warned us earlier that something's going to

be wrong here.

But you know, the important thing is forward checking the sound in the sense of it really

guarantees to give us an equivalent network which is really the one thing that all inference

algorithms should be.

It's cheap, it's useful, so ultimately really whenever you try to solve a constraint network

it's basically rarely a smart idea to not use forward checking or in fact one of the

stronger inference methods that subsume forward checking anyway.

Teil eines Kapitels:
Recaps

Zugänglich über

Offener Zugang

Dauer

00:04:23 Min

Aufnahmedatum

2020-10-31

Hochgeladen am

2020-10-31 10:07:00

Sprache

en-US

Recap: Forward Checking

Main video on the topic in chapter 10 clip 3.

Einbetten
Wordpress FAU Plugin
iFrame
Teilen